<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:useBean id="user" class="entity.User" scope="session"/>
<jsp:useBean id="userEdit" class="entity.User" scope="session"/>
<html>
	<head>
		<title>Recreation Manager - Promena ličnih podataka</title>
		<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="theme.css">
		<script type="text/javascript" src="scripts/linkfader.js"></script>
	</head>
	<c:if test="${user.type!='A'}">
		<c:redirect url="./main.jsp" />
	</c:if>
	<body>
	<center>
	
	<c:import url="./header.jsp"></c:import>
	<table class="mainTable">
		<tr>
			<td width="200px" valign="top">
				<c:import url="./menu.jsp"></c:import>
			</td>			
			<td valign="top">
			<!-- itt kezdodik -->
			<form action="./UserEditAdmin" name="formEditProfile" method="post" accept-charset="ISO-8859-1">
			<table class = "userChangeTable">
				<tr>
						<td colspan = "2"><h2 align="center">Izmena podataka korisnika</h2></td>
				</tr>
			<tr>
				<td align="right">Ime:</td>
				<td><input type="text" name="firstName" value="${userEdit.firstName}"></td>
			</tr>
			<tr>
				<td align="right">Prezime:</td>
				<td><input type="text" name="lastName" value="${userEdit.lastName}"></td>
			</tr>
			<tr>
				<td align="right">Broj telefona:</td>
				<td><input type="text" name="phone" value="${userEdit.phone}"></td>
			</tr>
			<tr>
				<td align="right">Administrator:</td>
				<td>
					<c:if test="${userEdit.type=='A'}" >
						<input type="checkbox" name="admin" checked="checked" value="true">
					</c:if>
					<c:if test="${userEdit.type=='K'}" >
						<input type="checkbox" name="admin" value="true">
					</c:if>
				</td>
			</tr>
			<tr>
				<td align="right">Brisanje slike:</td>
				<td><input type="checkbox" name="delPic" value="true"></td>
			</tr>
			<tr>
				<td align="right"><input type="hidden" name="idUsr" value="${userEdit.userId}"></td>
				<td><input type="submit" name="submit" value="Promena" ></td>
			</tr>
		</table>
		</form>
			<!-- itt vegzodik -->
			</td>
		</tr>
	</table>
	
	</center>
	</body>	
</html>